<body leftmargin="0" rightmargin="0" topmargin="0">
<div style=" background: url(images/title-bg.jpg); height:64px; text-align:right;">
<img src="images/head.jpg">
</div>

<!--left menu start-->
<div style="float: left; width:180px; height:100%; margin-right:20px;">
<?
include "menu.inc.php";
?>
</div>
<!--left menu end-->

<!--Main start here-->
<form name="form" action="?act=approve_outing" id="daftar" method="post" onSubmit="return GoSubmit(this)">
  <br>
  <table width="750" border="0" cellpadding="2" cellspacing="0" class="tableMainBodyFont">
    <tbody>
      <tr>
        <td width="3%" align="center" bgcolor="#aaaaaa" style=" border-top-style:solid;border-top-width:1px;"><strong>Senarai Menu </strong></td>
      </tr>
    </tbody>
  </table>
  <table width="750" class="tableMainBodyFont">
    <tr>
      <td>
      <a href="?act=user_list"></a></td>
      <td align="right"><a href="?act=new">Tambah</a></td>
    </tr>
  </table>
  <table width="750" border="1" bgcolor="#dddddd" class="tableMainBodyFont" id="qua_table">
    <tr style=" border-bottom-style:dashed; border-bottom-width:thin;">
      <th width="15">Bil</th>
      <th width="8%">Parent?</th>
      <th width="150">Menu</th>
      <th width="">Alt</th>
      <th width="">URL</th>
      <!--th width="">Filename1</th-->
      <!--th width="">Filename2</th-->
      <th width="">Susunan</th>
      <th width="">&nbsp;</th>
    </tr>
    <?
	$bil = 0;
    while ($menu = pg_fetch_object($menus)) {
		$bil++;
    ?>
    <tr align="center" id="<?="row_$i"?>">
      <td align="center"><?=$bil?></td>
      <td align="center"><? echo ($menu->is_parent=='t')?"Ya":"&nbsp;";?></td>
      <td align="left"><?=$menu->caption?></td>
      <td align="left">&nbsp;<?=$menu->alt?></td>
      <td align="left">&nbsp;<?=substr($menu->url,0,30)?></td>
      <!--td align="left">&nbsp;<?=$menu->filename?></td-->
      <!--td align="left">&nbsp;<?=$menu->filename2?></td-->
      <td align="right">&nbsp;<?=$menu->sort?></td>
      <td><a href="?act=edit&id=<?=$menu->id?>" style="color:blue;">Edit</a> | 
	      <a href="javascript: confirmDelete(<?=$menu->id?>);" style="color:blue;">Padam </a>	  </td>
    </tr>
    <?
	  }
	  ?>
  </table>

</form>

<!--Main end here-->
</body>
<script>
function GoSubmit(df) {
	
	if (!checkInput(icnumRegExp,document.getElementById('ic_new'),'No Kad Pengenalan Baru')) return false;
	//if (!checkInput(anythingRegExp,$('name'),'Nama Staf')) return false;
	//if (!checkSelection(strRegExp,document.getElementById('gender'),'Jantina')) return false;
	return true;
}

function checkAll(df) {
  for (i=1; i<df.elements.length; i++ )
  {
     if (df.elements[i].type == "checkbox")
     {
       df.elements[i].checked = df.checkall.checked
     } 
  }
}

function confirmDelete(id) {
	if(confirm("Adakah anda pasti?")) {
		location = '?act=destroy&id=' + id;
	}
	else return;
}

flash = '<?=$_SESSION['flash']?><? $_SESSION['flash']=''?>';
if (flash!='') alert(flash);

</script>

